#ifndef __XSIP_MESSAGE_H__
#define __XSIP_MESSAGE_H__
#include "xobject.h"

class XSIPContent;
class XSIPTransaction;
class XSIPHeader;
class XSIPContent;
class XSIP_API XSIPMessage : public XSIPObject {
public:
	enum {
		REQUEST_MESSAGE = 1,
		RESPONSE_MESSAGE,
	};
	XSIPMessage(int type);
	virtual ~XSIPMessage();
	virtual void* getObject(const char* name) const;

	int getRawData(char* data, int size);

	int getMessageType();
	XSIPTransaction* getTransaction();
	void setTransaction(XSIPTransaction* transaction);

	XSIPHeader* getHeader();
	void setHeader(XSIPHeader* header);
	XSIPContent* getContent();
	void setContent(XSIPContent* content);
private:
	int m_messageType;
	XSIPTransaction* m_transaction;
	XSIPHeader *m_header;
	XSIPContent *m_content;
};

#endif